home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm1
/
amoscums.lha
/
amosaicmailtoums.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1996-05-01
|
1KB
|
65 lines
/* $VER: amosaicmailtoums.rexx 0.21 (21.04.96) */
/* by Lothar Bartsch (lbartsch@anjou.hb.provi.de) */
/* */
/* This script use mailto: with AMosaic and UMS */
/* */
/* Usage: */
/* setenv Mosaic/editor ed sticky */
/* setenv Mosaic/sendmail rx amosaicmailtoums.rexx */
/* Insert your configs here */
name = ""
password = ""
server = ""
OPTIONS RESULTS
CALL AddLib("rexxsupport.library", 0, -30, 0)
CALL AddLib("ums.library", 0, -210, 11)
CALL UMSInitConsts()
msgfile = 't:.temp.'Pragma(ID)
Open(mail,msgfile,'W')
addr = Word(ReadLn('STDIN'),2)
parse VAR addr user '@' dom .
subj = SubWord(ReadLn('STDIN'),2)
nwsr = SubWord(ReadLn('STDIN'),2)
DO UNTIL Eof('STDIN')
CALL WriteLn(mail, ReadLn('STDIN'))
END
Close(mail)
/* Login */
account = UMSLogin(name,password,server)
IF account = 0 THEN DO
EXIT 10
END
/* Write the message */
DROP msg.
msg.UMSCODE_MsgText_FILE = msgfile
msg.UMSCODE_ToAddr = user'@'dom
msg.UMSCODE_ToName = user
msg.UMSCODE_Subject = subj
msg.UMSCODE_Newsreader = nwsr
num = UMSWriteMsg(account, msg.)
/* Logout */
IF account ~= 0 THEN DO
CALL UMSLogout(account)
account = 0
END
CALL delete(msgfile)
EXIT